package com.hexorld.core;

import java.util.ArrayList;

import com.hexorld.layer.Layer;

/**
 * place sprite in right layer, manage their spawn /dead /dismiss
 * @author HJJ
 *
 */
public class SpriteManager {
	private LayerManager mLayerMgr = null;
	private ArrayList<Character> mSpriteList = new ArrayList<Character>();

	public SpriteManager(LayerManager lm){
		mLayerMgr = lm;
	}
	
	public void addSprite(Character i){
		mSpriteList.add(i);
		Layer layer = mLayerMgr.getLayerAt(1); //add entity in action layer
		layer.add(i);
		
		layer = mLayerMgr.getLayerAt(2); //add status view in front layer
		layer.add(i.getStatusView());
		
	}
}
